package cn.emove.modular.system.service;


import cn.emove.core.common.page.LayuiPageFactory;
import cn.emove.modular.system.entity.Picking;
import cn.emove.modular.system.mapper.PickingMapper;
import cn.emove.modular.system.model.PickingDto;
import cn.stylefeng.roses.core.datascope.DataScope;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PickingService extends ServiceImpl<PickingMapper, Picking> {
    public Page<Map<String, Object>> selectPickings(DataScope dataScope, String pickingNo, String orderNo, String beginTime, String endTime, String lackMaterialsFlag, String shopAdr, String materialDescribe) {
        Page page = LayuiPageFactory.defaultPage();
        return this.baseMapper.selectPickings(page,dataScope,pickingNo, orderNo,beginTime, endTime,lackMaterialsFlag,shopAdr,materialDescribe);
    }

    public List<Map<String, Object>> selectMaterialData() {
        return this.baseMapper.selectMaterialData();

    }

    public List<PickingDto> selectAllPickings(String pickingNo, String orderNo, String beginTime, String endTime, String lackMaterialsFlag, String shopAdr, String materialDescribe) {
        return this.baseMapper.selectAllPickings(pickingNo,orderNo,beginTime,endTime,lackMaterialsFlag,shopAdr,materialDescribe);
    }
}
